\(\int \frac {1}{a-a \sin ^2(c+d x)} \, dx\) [45]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 13 \[ \int \frac {1}{a-a \sin ^2(c+d x)} \, dx=\frac {\tan (c+d x)}{a d} \]

[Out]

tan(d*x+c)/a/d

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3254, 3852, 8} \[ \int \frac {1}{a-a \sin ^2(c+d x)} \, dx=\frac {\tan (c+d x)}{a d} \]

[In]

Int[(a - a*Sin[c + d*x]^2)^(-1),x]

[Out]

Tan[c + d*x]/(a*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3254

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \sec ^2(c+d x) \, dx}{a} \\ & = -\frac {\text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{a d} \\ & = \frac {\tan (c+d x)}{a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00 \[ \int \frac {1}{a-a \sin ^2(c+d x)} \, dx=\frac {\tan (c+d x)}{a d} \]

[In]

Integrate[(a - a*Sin[c + d*x]^2)^(-1),x]

[Out]

Tan[c + d*x]/(a*d)

Maple [A] (verified)

Time = 0.34 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.08

method result size
derivativedivides \(\frac {\tan \left (d x +c \right )}{a d}\) \(14\)
default \(\frac {\tan \left (d x +c \right )}{a d}\) \(14\)
risch \(\frac {2 i}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}\) \(23\)
norman \(-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) \(33\)
parallelrisch \(-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}\) \(33\)

[In]

int(1/(a-a*sin(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

tan(d*x+c)/a/d

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.62 \[ \int \frac {1}{a-a \sin ^2(c+d x)} \, dx=\frac {\sin \left (d x + c\right )}{a d \cos \left (d x + c\right )} \]

[In]

integrate(1/(a-a*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

sin(d*x + c)/(a*d*cos(d*x + c))

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 41 vs. \(2 (8) = 16\).

Time = 0.47 (sec) , antiderivative size = 41, normalized size of antiderivative = 3.15 \[ \int \frac {1}{a-a \sin ^2(c+d x)} \, dx=\begin {cases} - \frac {2 \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} - a d} & \text {for}\: d \neq 0 \\\frac {x}{- a \sin ^{2}{\left (c \right )} + a} & \text {otherwise} \end {cases} \]

[In]

integrate(1/(a-a*sin(d*x+c)**2),x)

[Out]

Piecewise((-2*tan(c/2 + d*x/2)/(a*d*tan(c/2 + d*x/2)**2 - a*d), Ne(d, 0)), (x/(-a*sin(c)**2 + a), True))

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00 \[ \int \frac {1}{a-a \sin ^2(c+d x)} \, dx=\frac {\tan \left (d x + c\right )}{a d} \]

[In]

integrate(1/(a-a*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

tan(d*x + c)/(a*d)

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00 \[ \int \frac {1}{a-a \sin ^2(c+d x)} \, dx=\frac {\tan \left (d x + c\right )}{a d} \]

[In]

integrate(1/(a-a*sin(d*x+c)^2),x, algorithm="giac")

[Out]

tan(d*x + c)/(a*d)

Mupad [B] (verification not implemented)

Time = 13.11 (sec) , antiderivative size = 13, normalized size of antiderivative = 1.00 \[ \int \frac {1}{a-a \sin ^2(c+d x)} \, dx=\frac {\mathrm {tan}\left (c+d\,x\right )}{a\,d} \]

[In]

int(1/(a - a*sin(c + d*x)^2),x)

[Out]

tan(c + d*x)/(a*d)